import { isUndefined } from './is-undefined'
import { isNull } from './is-null'

/**
 * 判断是否为 undefined 或 null
 *
 * @param value 需要进行判断的值
 * @returns {value is undefined | null} true 为 undefined 或 null，false 为其他类型
 */
export const isNone = (value: any): value is undefined | null => isUndefined(value) || isNull(value)

export type IsNoneType = typeof isNone
